package net.cyndeline.GUI.graphics

import net.cyndeline.GUI.MapLayer
import net.cyndeline.entitySystem.EntityRef
import net.cyndeline.components.objectProperties.MapKey

class EntityKeyConverter {
  def formatForRendering(entity: List[EntityRef]): List[(String, MapLayer)] =
    for (
        e <- entity.toList
        if (e.getComponent(classOf[MapKey]).isDefined) 
      ) yield {
    	val renderData = e.getComponent(classOf[MapKey]).get
    	(renderData.key, renderData.layer)
    }
}